Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement fft along axis #5

Merged
merged 5 commits into from
Dec 5, 2023
Merged

Implement fft along axis #5

merged 5 commits into from
Dec 5, 2023

Conversation

yasahi-hpc
Copy link
Collaborator

Add internal transpose capability to allow FFT on non-contiguous axis.
For example, following FFTs on 2D Views with LayoutRight are now available:

const int n0 = 10, n1 = 12;
template <typename T> using View2D = Kokkos::View<T**, Kokkos::LayoutRight, Kokkos::DefaultExecutionSpace>;
View2D<Kokkos::complex<double> > x("x", n0, n1);
View2D<Kokkos::complex<double> > out_axis0("out_axis0", n0, n1);
View2D<Kokkos::complex<double> > out_axis1("out_axis1", n0, n1);

// Batched 1D FFT along axis 0 (transpose neeed)
KokkosFFT::fft(x, out_axis0, KokkosFFT::FFT_Normalization::BACKWARD, /*axis=*/0);

// Batched 1D FFT along axis 1 (OK without any transpose)
KokkosFFT::fft(x, out_axis0, KokkosFFT::FFT_Normalization::BACKWARD, /*axis=*/1);

@yasahi-hpc yasahi-hpc merged commit bd843c1 into main Dec 5, 2023
2 checks passed
@yasahi-hpc yasahi-hpc deleted the implement-fft-along-axis branch December 5, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant